package com.tenement.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.sql.Timestamp;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *  实体类。
 *
 * @author BertXie
 * @since 1.0.1
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(value = "sys_resolution")
public class Resolution implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id(keyType = KeyType.Generator, value = "snowFlakeId")
    private Long id;

    private String title;

    private String description;

    private String options;

    private Timestamp startTime;

    private Timestamp endTime;

    private Short type;

    @Column(onInsertValue = "now()")
    private Timestamp createTime;

    @Column(onUpdateValue = "now()")
    private Timestamp updateTime;

    private Long pushId;

    private Short voteType;

    private Short isAnonymity;

    private Short multiple;

    private Integer atMost;

    private Short dec;

    // 状态0未开始,1开始,2结束
    private Short status;

    private Short showWay;

    private String cover;

    private User user;

    @Column(tenantId = true)
    private Long tenementId;

}
